package com.jdym.back.service.impl;

import com.jdym.back.entity.Loan;
import com.jdym.back.entity.Put;
import com.jdym.back.mapper.PutMapper;
import com.jdym.back.service.PutService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 放款表 服务实现类
 * </p>
 *
 * @author ${author}
 * @since 2021-09-20
 */
@Service
public class PutServiceImpl extends ServiceImpl<PutMapper, Put> implements PutService {
    @Autowired
    PutMapper putMapper;
    //查询  put放款表 全部信息
    public List<Put> queryAll(){
        return putMapper.selectList(null);
    }

    @Override
    public Put getPutById(Integer putId) {
        return putMapper.getPutById(putId);
    }

    //查询 放款、银行、企业 三表的 放款信息
    public List<Loan> FindCobFirmPutAll(){
        return putMapper.FindCobFirmPutAll();
    }

    //模糊查询 放款 根据企业名称、银行名称查询
    public List<Put> FindNameByKeyWord(String keyWord) {
        return putMapper.FindNameByKeyWord(keyWord);
    }

}
